package com.xqit.ydzhkt.answer.controller;


import com.xqit.ydzhkt.answer.service.AddAnswerService;
import com.xqit.ydzhkt.answer.service.AddQuestionService;
import com.xqit.ydzhkt.entity.AnswerEntity;
import com.xqit.ydzhkt.entity.QuestionEntity;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * Created by Janus on 2020/6/9
 */
@RestController
@RequestMapping("/addQuestion")
@Api(tags = "增加提问和回答")
public class AddQuestionController {
    @Autowired
    private AddQuestionService addQuestionService;
//    @Autowired
//    private AddAnswerService addAnswerService;

    @PostMapping("/addquestiontitle")
    @ApiOperation("添加提问")
    public void addQuestion(int studentId,int teacherId,String questionTitle,String questionContent) {
//        Integer i = questionEntity.getId();
//        answerEntity.setQuestionId(i);
        addQuestionService.addQuestion(studentId,teacherId,questionTitle,questionContent);

//        addAnswerService.addAnswer(answerEntity);
    }


}
